#ifndef KMYITEXTURE_H
#define KMYITEXTURE_H

#include <string>
#include "KmyTypedef.h"

using namespace std;

class KmyITexture
{
public:
    KmyITexture();
    KmyITexture(int mode, const u8* data,
                int w, int h, bool is_buffer);

    void finalize();

    int width, height;

//    string name;

    bool is_buffer;
    bool is_changed;
    /**
     * 0 ARGB8
     * 1 RGB8
     * 2 ARGB4
     * 3 RGB565
     */
    enum{
        TEXTURE_MODE_RGBA8 = 0,
        TEXTURE_MODE_RGBA4,
        TEXTURE_MODE_RGB565,
        TEXTURE_MODE_ARGB8,
        TEXTURE_MODE_RGB8,
        TEXTURE_MODE_ARGB4
    };
    int mode;
    u8* data;

    bool is_drawed;
    void disDraw();

    int gid;
};

#endif // KMYTEXTURE_H
